import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;

public final class bn extends ba implements br {

	private int a;
	private int b;
	private int c;

	public bn(o o1, int i, int j) {
		super(o1, i, j);
	}

	public final void b(int i, int j) {
		if (i < 0)
			a = 0;
		if (i > j) {
			a = j;
		} else {
			a = i;
		}
		b = j;
		A();
		return;
	}

	public final int g(int i) {
		return super.I.v;
	}

	public final int b_(int i) {
		if (bh.b().a((ba) this) == 0)
			return 0;
		if (c == 0)
			c = i;
		a = (i - c) / 25;
		A();
		return 200;
	}

	public final void a(Graphics g1, bh bh1, o o1, int i, int j) {
		int l = b;
		int k = a;
		if (l == 0) {
			bh.b().b((br) this);
			Image image = o1.r.a;
			int j1 = (image).getWidth();
			int k1 = image.getHeight();
			int l1 = j1 - k % j1;
			int i2 = 0;
			while (i2 < i) {
				int j2;
				j2 = j1 - l1;
				g1.drawRegion(image, l1, 0, j2, k1, 0, i2, 0, 20);
				l1 = 0;
				i2 += j2;
			}
			return;
		}
		int i1 = (int) (((long) k * (long) i) / (long) l);
		g1.setColor(o1.o);
		g1.fillRect(0, 0, i1, j);
		g1.setColor(o1.n);
		g1.fillRect(i1, 0, i - i1, j);
		return;
	}
}